﻿using System;
class Prime
{
	static bool isPrime(int n)
	{
		if (n  <=1)
		{
			return false;
			
		}
		for (int i = 2; i < n; i++)
		{
			if (n % i == 0)
			{
				return false;
			}
		}
		return true;
	}
	static void Main(string[] args)
	{
		int cnt = 0;
		Console.WriteLine("请输入上限");
		int max = Convert.ToInt32(Console.ReadLine());
		Console.WriteLine("请输入下限");
		int min = Convert.ToInt32(Console.ReadLine());
		if (min <= 0 || max <= 0 || min > max)
		{
			Console.WriteLine("无效的输入");
		}
		for (int i = min; i <= max; i++)
		{
			
			if (isPrime(i))
			{
				Console.Write(i);
				
				cnt++;
                if (cnt % 10 == 0)
                {
                    Console.Write('\n');
				}
				else
				{
                    Console.Write(',');
                }
            }
		}
	}

}

